package com.mvc.ejemplo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;

public class HolaController extends MultiActionController{
	
	public ModelAndView helloWord(HttpServletRequest request, HttpServletResponse response) throws Exception {
		ModelAndView mav = new ModelAndView("ejemplo/hello");

		String context = request.getContextPath();
		String path = request.getRequestURI().substring(context.length());
		// String path = request.getServletPath();

		mav.addObject("saludo", "HolaMundo desde de Spring MCV path["+path+"]");

		 
	 

		// para los reportes
 
		return mav;
	}

}
